# 定义闭包
def outer():
    a = 100

    def inner():
        print("*" * 50)
        # 修改外部函数中的变量
        nonlocal a
        a += 1
        print(f"修改后的结果：{a}")
        print("*" * 50)

    return inner


# 调用闭包
# result = outer()
# print(result)
# result()

outer()()
